package com.luoran.system.controller;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.luoran.system.api.domain.SysUser;
import com.luoran.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;

import javax.swing.*;

public class CellDataDemoHeadDataListener1 implements ReadListener<SysUser> {
    @Autowired
    private  ISysUserService userService;
    public CellDataDemoHeadDataListener1(ISysUserService userService) {
        this.userService= userService;
    }


    @Override
    public void invoke(SysUser user, AnalysisContext analysisContext) {
        userService.insertUsers(user);

    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.out.println("=============解析玩之后的方法");
    }
}
